package com.fastCms.business.frame.exception;

import com.fastCms.business.frame.constant.ResultCodeConst;
import lombok.Data;

/**
 * @Description 异常基础类
 * @Param
 * @Return
 * @Date 2019/3/7 下午1:26 lsquan
 */
@Data
public class BusinessException extends Exception {

    private int code;
    private String message;

    public BusinessException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public BusinessException(String message) {
        this.code = ResultCodeConst.FAIL_CODE;
        this.message = message;
    }
}
